package com.huimingpay.transaction.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

/**
 * 
 * @TableName platform_pay_channel
 */
@TableName(value ="platform_pay_channel")
public class PlatformPayChannel implements Serializable {
    /**
     * 
     */
    @TableId
    private Long id;

    /**
     * 平台支付渠道编码
     */
    private String platformChannel;

    /**
     * 原始支付渠道名称
     */
    private String payChannel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 平台支付渠道编码
     */
    public String getPlatformChannel() {
        return platformChannel;
    }

    /**
     * 平台支付渠道编码
     */
    public void setPlatformChannel(String platformChannel) {
        this.platformChannel = platformChannel;
    }

    /**
     * 原始支付渠道名称
     */
    public String getPayChannel() {
        return payChannel;
    }

    /**
     * 原始支付渠道名称
     */
    public void setPayChannel(String payChannel) {
        this.payChannel = payChannel;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PlatformPayChannel other = (PlatformPayChannel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPlatformChannel() == null ? other.getPlatformChannel() == null : this.getPlatformChannel().equals(other.getPlatformChannel()))
            && (this.getPayChannel() == null ? other.getPayChannel() == null : this.getPayChannel().equals(other.getPayChannel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPlatformChannel() == null) ? 0 : getPlatformChannel().hashCode());
        result = prime * result + ((getPayChannel() == null) ? 0 : getPayChannel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", platformChannel=").append(platformChannel);
        sb.append(", payChannel=").append(payChannel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}